<?php
require 'top.php';
?>



<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="utf-8" />
		<title>个人中心</title>
		<link rel="stylesheet" type="text/css" href="css2/public.css"/>
		<link rel="stylesheet" type="text/css" href="css2/mygxin.css" />
	</head>
	<body>
		<!------------------------------head------------------------------>
		
		<?php
		error_reporting(5);
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(0);
header('content-type:text/html;charset=utf-8');

//身份验证
session_start();
if (!isset($_SESSION['login'])) {
	header('Refresh:2;url=login/index.php');
	echo "你还没有登陆！";
	die();
}

require 'config.php';
$email=$_SESSION['login'];
$query_email="SELECT * FROM users WHERE `uemail`='$email'";
$result_email=mysqli_query($config,$query_email);
$row_email=mysqli_fetch_array($result_email);
// echo $row_email['uemail'];
$user_email=$row_email['userid'];
// var_dump($row_email);
$gds="SELECT * FROM goods WHERE `userid`='$user_email' AND state='-1' ";
// $goods="SELECT * FROM goods ORDER BY goodsid DESC";
			$resultgoods=mysqli_query($config,$gds) or die ('SQL语句有误:'.mysql_error());


		?>
		
		
		<!------------------------------Bott------------------------------>
		<div class="Bott">
			<div class="wrapper clearfix">
				<div class="zuo fl">
					
					<div style="height: 600px;">
						<h4>个人中心</h4>
						<ul>
							<li  class="on"><a href="manage.php">我的中心</a></li>
							<li><a href="goods_add.php">商品发布</a></li>
						</ul>

						<h4>我的交易</h4>
						<ul>
							<li><a href="cart.php?buyerid=<?php echo $user_email;?>">我的购物车</a></li>
							<li><a href="order_goods_ok.php?buyerid=<?php echo $user_email;?>">我的订单</a></li>
							
						</ul>
						<h4>账户管理</h4>
						<ul>
							<li><a href="information.php">个人信息</a></li>
							<li><a href="xiugai_password.php">修改密码</a></li>
						</ul>
					</div>
				</div>
				<div class="you fl" style="height:100%;">
					<div class="tx clearfix" >
						<div class="fl clearfix" >
							
							<p class="fl"><span><?php echo $row_email['uname']?></span><a href="xiugai.php">修改个人信息></a></p>
						</div>
						<div class="fr">绑定邮箱：<?php echo $row_email['uemail']?></div>
					</div>
				
					
					<div class="bott">
						<div class="clearfix" style="margin-top: -12px;margin-bottom: 100px;position: relative;">
						<h3>审核失败的商品</h3>
						<a href="manage.php" style="float: right;margin-top: -16px;font-weight: bold;color: darkred;font-size: 12px;">返回></a>	
						<table width="740" border="1" cellspacing="0" cellpadding="0" style="margin-top: 6px;font-size: 13px;margin-left: 0px;">
							<tr style="background-color: #eae6e7;height: 24px;">
								<th style="text-align: center;font-weight: bold;">商品id</th>
								<th style="text-align: center;font-weight: bold;">商品信息</th>
								<th style="text-align: center;font-weight: bold;">商品图片</th>
								<th style="text-align: center;font-weight: bold;">商品价格</th>
								<th style="text-align: center;font-weight: bold;">库存</th>
								<th style="text-align: center;font-weight: bold;">用户昵称</th>
								<th style="text-align: center;font-weight: bold;">电话</th>
								<th style="text-align: center;font-weight: bold;">地址</th>
								<th style="text-align: center;font-weight: bold;">发布时间</th>
								<th style="text-align: center;font-weight: bold;">状态</th>
								<th style="text-align:center;font-weight: bold;color: darkred;width: 70px;">操作</th>
							</tr>
								<?php 
 while ($ro=mysqli_fetch_array($resultgoods)){
// var_dump($ro);
 	// $i=0;
 	// for ($i=0; $i <$ro['goodsid'] ; $i++) { 

 



?>
							<tr> 
								<td style="text-align: center;"><?php echo $ro['goodsid']?></td>
						<td style="text-align: center;"><?php echo $ro['goodsname']?></td>
						<td style="width: 100px;height: 100px;background-color: red;text-align: center;"><img src="images/goods/<?php echo $ro['bigtypeid'];?>/<?php echo $ro['smalltypeid'];?>/<?php echo $ro['picture'];?>" style="width: 100%;height: 100%;"></td>
						<td style="text-align: center;"><?php echo $ro['price']?></td>
						<td style="text-align: center;font-weight: bold;color: red;width: 26px;font-size: 17px;"><?php echo $ro['kucun']?></td>
						<td style="text-align: center;"><?php echo $row_email['uname']?></td>
						<td style="text-align: center;"><?php echo $row_email['uphone']?></td>
						<td style="text-align: center;"><?php echo $row_email['uaddress']?></td>
						<td style="text-align: center;"><?php echo $ro['pub_time']?></td>
						<td style="text-align: center;width: 100px;color: darkred;font-weight: bold;">商品审核失败(图片、信息违规)</td>
						<td style="text-align:center;"> 
						<a href="goods_xiugai.php?id=<?php echo $ro['goodsid']?>" style="float: left;margin: auto;position: absolute;right:40px;color: darkred;">修改</a>&nbsp;              
					<a href="manage_delete.php?id=<?php echo $ro['goodsid']?>" style="float: right;margin: auto;margin-right: 8px;color: darkred;" onclick="return confirm('是否确认删除该商品？');">删除</a>&nbsp;            
				</td>



							</tr>
<?php      
  }
?>

						</table>

						
						</div>

					</div>

				</div>
			</div>
		</div>
		
		
		
		
		
		<script src="js2/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js2/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="js2/user.js" type="text/javascript" charset="utf-8"></script>
		
	</body>
</html>
